/**
 * create by young (young2f@outlook.com) on 2023/4/16
 */
'use strict';
module.exports = app => {
  const {router, controller} = app;
  router.post('/api/procure/create', controller.procure.createOrder);
  router.post('/api/procure/update', controller.procure.updateOrder);
  router.post('/api/procure/delete', controller.procure.deleteOrder);
  router.post('/api/procure/review', controller.procure.review);
  router.post('/api/procure/find/many', controller.procure.findMany);
  router.post('/api/procure/statistic/find', controller.procure.findStatistic);

  router.post('/api/procure/find', controller.procure.findOne);
  router.post('/api/procure/export', controller.procure.export);
//订单物料占用
  router.post('/api/procure/material/use/find/many', controller.procure.findUsedProcureMaterials);
  router.post('/api/procure/material/use/lot/find/many', controller.procure.findUsedProcureMaterialLots);

  router.post('/api/procure/material/record/find/many', controller.procure.findProcureMaterialRecordMany);
  router.post('/api/procure/material/lot/assess', controller.procure.procureMaterialLotAssess);
  router.post('/api/procure/material/lot/find', controller.procure.findProcureMaterialLot);
  router.post('/api/procure/material/record/findBy/orderCode/many', controller.procure.findProcureMaterialRecordByProcureOrderCodeMany);
  router.post('/api/procure/material/create', controller.procure.createProcureMaterial);
  router.post('/api/procure/material/useSalesOrder/find', controller.procure.findProcureMaterialUseSalesOrder);

  /**
   * 退补货
   */
  router.post('/api/procure/material/returnOfGoods/find/many', controller.procure.findReturnOrderMany);
  router.post('/api/procure/material/returnOfGoods/create', controller.procure.createReturnGoodsOrder);
  router.post('/api/procure/material/returnOfGoods/delete', controller.procure.deleteReturnGoodsOrder);
  router.post('/api/procure/material/returnOfGoods/update', controller.procure.updateReturnGoodsOrder);

};
